package com.xyh.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xyh.system.model.RoleMenu;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xyh
 * @since 2020-12-30
 */
@Repository
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {
    @Select("select menu_id from role_menu where role_id = #{roleId}")
    Integer[] getMenusByRoleId(@Param("roleId") Integer roleId);

    int insertRoleMenus(@Param("roleId") Integer roleId, @Param("menuIds") Integer[] menuIds);
}
